/* ====================================== toast  ====================================== */
import { Modal } from 'ant-design-vue'
import { createVNode } from 'vue'
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'
// ===================================================================== Confirm
const Index = ({ msg, okText, cancelText, onOk, onCancel, type='confirm'  }) => {
	Modal[type]({
		title: '提示',
		icon: createVNode(ExclamationCircleOutlined),
		content: msg || '确认删除？',
		okText: okText || '确认',
		cancelText: cancelText || '取消',
		onOk,
		centered: false,
		className: 'confirm',
		onCancel: close => {
			onCancel && onCancel()
			close()
		}
	})
}
export default Index